#ifndef __BLE_H__
#define __BLE_H__

#include "main.h"
#include "usart.h"

#define UART2BUFLEN  64
#define UART2DATALEN 64

struct UART2Data{
	volatile int received;
	uint8_t uartBuf[UART2BUFLEN];
	uint8_t buf[UART2DATALEN];
	uint8_t connected;
	uint8_t dataStart;
	uint8_t dataEnd;
	uint8_t curDataLen;
	uint8_t totalDataLen;
};

extern struct UART2Data uart2data;
extern void uart2registerIdleCallback(void);
extern void uart2IdleCallback(uint16_t size);
extern void uart2DataHandle(void);
extern void BleInit(void);
#endif
